package com.bawei.park2301.user

import android.service.autofill.UserData
import androidx.lifecycle.MutableLiveData
import com.bawei.libs_base.entity.Res
import com.bawei.libs_base.entity.UserBean
import com.bawei.libs_base.mvvm.BaseViewModel
import com.bawei.libs_base.net.ApiService
import com.blankj.utilcode.util.ApiUtils.Api
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class UserViewModel @Inject constructor(val apiService: ApiService):BaseViewModel() {
    val loginData =MutableLiveData<Res<UserBean>>()

    fun login(username:String,pwd:String){
        httpRequest({apiService.login(username,pwd)},loginData::postValue)
    }
}